package com.hdax.dm.mapstucts.qinziDtoMapper;

import com.hdax.dm.beans.item.Item;
import com.hdax.dm.dto.qinziDto.getAdimgUrlDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(componentModel = "Spring")
public abstract class getAdimgUrlDtoMapper {

    @Mapping(source = "startTime" ,target = "startDate")
    @Mapping(source = "endTime" ,target = "endDate")
    public abstract getAdimgUrlDto toTarget(Item source);

    public abstract List<getAdimgUrlDto> toTargetList(List<Item> sources);
}
